﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="SobFS.Web.backend.manage.permission.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../../javascript/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="../../css/default.css" rel="stylesheet" type="text/css" />
    <script src="../../../javascript/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../../javascript/ui/js/ligerBuild.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../javascript/function.js"></script>
    <script type="text/javascript">
        function doAllCheck(chk) {
            for (var i = 1; i < 5; i++) {
                var obj = chk.parentNode.parentNode.cells[i].childNodes[1];
                var tb = document.all("conRole_Right");
                if (tb.value == "") tb.value = ",";
                obj.checked = chk.checked;
                if (chk.checked) {
                    if (tb.value.indexOf(obj.value) < 0) {
                        tb.value += obj.value + ",";
                    }
                }
                else {
                    tb.value = tb.value.replace("," + obj.value + ",", ",");
                }
            }
        }
    </script>
</head>
<body class="mainbody">
    <form id="form1" runat="server">
    <div class="navigation">
        控制面板 >> 权限分配管理</div>
    <div class="tools_box">
        <div class="tools_bar">
            <asp:LinkButton ID="btnSave" CssClass="tools_btn" runat="server" OnClick="btnSave_Click"><span><b class="save">提交保存</b></span></asp:LinkButton>
        </div>
    </div>
    <div style="text-align: left; vertical-align: middle; border: 1px solid #EDECFF; border-bottom: 1px;">
        <b>用户组：</b><asp:DropDownList ID="ddlUserGroup" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlUserGroup_SelectedIndexChanged">
        </asp:DropDownList>
        <input id="conRole_Right" runat="server" type="hidden" style="width: 1px" />
        <asp:GridView ID="gvList" runat="server" DataKeyNames="Id" CssClass="msgtable" AutoGenerateColumns="false" OnRowDataBound="gvList_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="功能菜单名称">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtFunctionMenu" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemStyle Font-Bold="False" HorizontalAlign="Center" />
                    <HeaderStyle Font-Size="8pt" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:Label ID="lblFunctionMenu" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="查看">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtView" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="chkV" runat="server" type="checkbox" name="mm" visible='<%#GetPermission(Eval("Code").ToString()) %>' value='<%#Eval("Code")+"_V" %>' />
                    </ItemTemplate>
                    <HeaderStyle Font-Size="8pt" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="新建">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtAdd" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="chkA" type="checkbox" runat="server" name="mm" value='<%#Eval("Code")+"_A" %>' visible='<%#GetPermission(Eval("Code").ToString()) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="修改">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEdit" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="chkE" type="checkbox" runat="server" name="mm" value='<%#Eval("Code")+"_E" %>' visible='<%#GetPermission(Eval("Code").ToString()) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDelete" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="chkD" runat="server" type="checkbox" name="mm" value='<%#Eval("Code")+"_D" %>' visible='<%#GetPermission(Eval("Code").ToString()) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="全选">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="chk_my" type="checkbox" onclick="doAllCheck(this)" runat="server" visible='<%#GetPermission(Eval("Code").ToString()) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="line15">
    </div>
    </form>
</body>
</html>
